﻿@{
ViewBag.Title = "日报查看";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section mystyle{

}

<!-- table -->
<div class="padding-top-10 padding-bottom-10 margin-top-20" id="form">
  <div class="container">
    <div class="row">
      <div>
        <h1 class="vm margin-0 logo-blue logo-height">工作日志管理系统</h1>
        <div class="float-right text-right">
          <h4 id="thisDay" class="vm margin-0"></h4>
          <br>
          <a class="btn btn-default margin-top-20 w140 lt10" href="/Dept/Project/level3"> <span class="glyphicon glyphicon-chevron-left lt0"></span> <b>返回</b></a>
        </div>
      </div>
      <div id="table" class="col-sm-12 margin-top-20">

        <table class="table table-border text-center" id="day">
          <thead>
          <tr>
            <th style="width: 200px;">品牌</th>
            <th style="width: 200px;">项目</th>
            <th>具体内容</th>
            <th>输出成果</th>
            <th>花费时间</th>
            <th></th>
          </tr>
          </thead>
          <tbody>
          <tr v-for="item in days">
            <td>
              <input type="text" hidden v-model="item.brand">
              <select name="selectBrand{{$index}}" id="selectBrand{{$index}}" class="selectBrand"></select>
            </td>
            <td>
              <input type="text" hidden v-model="item.name">
              <select name="selectProject{{$index}}" id="selectProject{{$index}}" class="selectProject"></select>
            </td>
            <td>
              <textarea name="textareaD{{$index}}" id="textareaD{{$index}}" rows="2" class="form-control" v-model="item.detail"></textarea>
            </td>
            <td>
              <textarea name="textareaR{{$index}}" id="textareaR{{$index}}" rows="2" class="form-control" v-model="item.result"></textarea>
            </td>
            <td>
              <select name="selectDays{{$index}}" id="selectDays{{$index}}" class="selectDays form-control" v-model="item.cost">
                <option v-for="item in hours" v-bind:value="item.value">
                  {{ item.value }}
                </option>
              </select>
            </td>
            <td>
              <button type="button" class="btn btn-danger" v-on:click="del($index)"><span class="glyphicon glyphicon-minus-sign"></span></button>
            </td>
          </tr>
          <tr>
            <td>
              <input type="text" hidden v-model="dayForm.brand">
              <select name="selectBrandForm" id="selectBrandForm" class="selectBrand"></select>
            </td>
            <td>
              <input type="text" hidden v-model="dayForm.name">
              <select name="selectProjectFrom" id="selectProjectFrom" class="selectProject"></select>
            </td>
            <td>
              <textarea name="textareaAMD{{$index}}" id="textareaDFrom" rows="2" class="form-control" v-model="dayForm.detail"></textarea>
            </td>
            <td>
              <textarea name="textareaDFrom" id="textareaRFrom" rows="2" class="form-control" v-model="dayForm.result"></textarea>
            </td>
            <td>
              <select name="selectDays" id="selectDays" class="form-control" v-model="dayForm.cost">
                <option v-for="item in hours" v-bind:value="item.value">
                  {{ item.value }}
                </option>
              </select>
            </td>
            <td>
              <button type="button" class="btn btn-success" v-on:click="add()">
                <span class="glyphicon glyphicon-plus-sign"></span></button>
            </td>
          </tr>
          </tbody>
        </table>

        <h3>今日总结</h3>
        <form class="form-horizontal padding-8">
          <div class="form-group">

            <div class="col-sm-12 margin-top-20">
              <textarea class="form-control" rows="5" v-model="form.value"></textarea>
            </div>
          </div>
        </form>

        <div class="text-center col-sm-2 col-sm-offset-5">
          <button class="btn btn-primary btn-lg btn-block" id="submit" v-on:click="save()">保存</button>
          <!--<button>取消</button>-->
        </div>

        <div class="col-sm-12">
          <p>填写说明：</p>
          <p>1、对每天未完成工作进行原因分析，并找到改进措施；在综合评估工作完成情况的前提下，对每日工作完成情况进行打分：90以上为优秀，完成全部工作任务；80分以上为良好，完成大部分工作任务；70分以上（含70分）为合格；70分以下为不合格。</p>
          <!--<p>2、重要等级：A类：紧急！重要！；B类：紧急！不重要！；C类：重要！不紧急！D类：不紧急！不重要。</p>-->
          <!--<p>备注:</p>-->
          <!--<p>请于每日下班前填写，如遇紧急情况或外出，请于次日补回。</p>-->
        </div>
      </div>
    </div>
  </div>
</div>

@section myscript{
<script src="~/Content/vendor/vue/vue.min.js"></script>
<script type="text/javascript">
  var datetime = '@DateTime.Now';
</script>

<script src="~/Content/js/level31.js"></script>
}